def input_password():
    pwd = input('请输入密码:')

    if (len(pwd) >= 8):
        return pwd

    raise Exception('密码长度不够')


if __name__ == '__main__':
    # try:
    #     input_password()
    # except Exception as e:
    #     print(e)

    #断言异常
    try:
        assert 1 == 1,'你的程序在这里发生了什么错误'   # assert 判别式,'提示词'
    except Exception as e:
        print(e)

    while True:
        pass

